package com.quasar.hpatient.network;

import com.quasar.hpatient.model.custommodel.DrugsAdjustmentData;
import com.quasar.hpatient.model.httpmodel.AnotherDataResult;
import com.quasar.hpatient.model.httpmodel.AnotherResult;
import com.quasar.hpatient.model.httpmodel.DataHeadResult;
import com.quasar.hpatient.model.httpmodel.DataStateResult;
import com.quasar.hpatient.model.httpmodel.HttpResult;
import com.quasar.hpatient.model.httpmodel.OuterLayerDataResult;
import com.quasar.hpatient.model.medicalmodel.AerainfoData;
import com.quasar.hpatient.model.medicalmodel.ArchivesData;
import com.quasar.hpatient.model.medicalmodel.BaseInfoVersionData;
import com.quasar.hpatient.model.medicalmodel.BloodTypeData;
import com.quasar.hpatient.model.medicalmodel.CarouselData;
import com.quasar.hpatient.model.medicalmodel.CaseinformationData;
import com.quasar.hpatient.model.medicalmodel.ClonePrescriptionData;
import com.quasar.hpatient.model.medicalmodel.CommunityData;
import com.quasar.hpatient.model.medicalmodel.ConsultationBean;
import com.quasar.hpatient.model.medicalmodel.DailyRecordData;
import com.quasar.hpatient.model.medicalmodel.DailyRecordDetailsData;
import com.quasar.hpatient.model.medicalmodel.DiagnoseListData;
import com.quasar.hpatient.model.medicalmodel.DiagnosisData;
import com.quasar.hpatient.model.medicalmodel.DiscomfortData;
import com.quasar.hpatient.model.medicalmodel.DoctorEventData;
import com.quasar.hpatient.model.medicalmodel.DoctorListBean;
import com.quasar.hpatient.model.medicalmodel.FriendsData;
import com.quasar.hpatient.model.medicalmodel.GetAmendVisitInfo;
import com.quasar.hpatient.model.medicalmodel.HealthRecordsBean;
import com.quasar.hpatient.model.medicalmodel.HospitalData;
import com.quasar.hpatient.model.medicalmodel.CollectionListData;
import com.quasar.hpatient.model.medicalmodel.ListDiagnose;
import com.quasar.hpatient.model.medicalmodel.MedicationRecordData;
import com.quasar.hpatient.model.medicalmodel.OnedayMedicationData;
import com.quasar.hpatient.model.medicalmodel.PatientInfoData;
import com.quasar.hpatient.model.medicalmodel.PhotoUrlData;
import com.quasar.hpatient.model.medicalmodel.PrescriptionDayData;
import com.quasar.hpatient.model.medicalmodel.PushinfoData;
import com.quasar.hpatient.model.medicalmodel.QueryAllPrescription;
import com.quasar.hpatient.model.medicalmodel.RecordingAnalysisData;
import com.quasar.hpatient.model.medicalmodel.SelectFriendsData;
import com.quasar.hpatient.model.medicalmodel.SevenDayInspectionData;
import com.quasar.hpatient.model.medicalmodel.TestPresentationData;
import com.quasar.hpatient.model.medicalmodel.TestRecordData;
import com.quasar.hpatient.model.medicalmodel.UpdateEdition;
import com.quasar.hpatient.onInterface.AnotherResultListener;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * author : 许建宏
 * Date: 2017/9/26 0026
 * View:
 */

public interface ApiService {

    //查询血型
    @GET("Bloodtypeinfo/getList")
    Observable<HttpResult<BloodTypeData>> booldTypeService();

    //查询地理信息
    @GET("Aerainfo/getList")
    Observable<AerainfoData> aerainfoService();

    //查询医院信息
    @GET("Hospitalinfo/getList")
    Observable<HospitalData> HospitalService();

    //检测数据库
    @GET("aeraInfo/LXT_Get_AllTbale_Location")
    Observable<ResponseBody> VersionDataService(@Query("list") String TableData);

    //登陆
    @POST("patientInfo/LXT_User_Login")
    Observable<DataStateResult> LoginService(@Query("userId") String userId, @Query("password") String password);

    //获取个人信息
    @POST("patientInfo/LXT_User_GetUserInformation")
    Observable<DataHeadResult<PatientInfoData>> UserInformation(@Query("userCode") String userCode, @Query("userId") String userId);

    //修改个人信息
    @POST("patientInfo/LXT_User_SubmitAllUserInformation")
    Observable<DataStateResult> UserUpdateInfo(@Query("userCode") String userCode,
                                               @Query("userId") String userId,
                                               @Query("phone") String phone,
                                               @Query("cover") String cover,
                                               @Query("nick") String nick,
                                               @Query("realName") String realName,
                                               @Query("bloodId") String bloodId,
                                               @Query("idCard") String idCard,
                                               @Query("birthday") String birthday,
                                               @Query("sex") String sex,
                                               @Query("optime") String optime,
                                               @Query("hosId") String hosId,
                                               @Query("sourceId") String sourceId,
                                               @Query("commonId") String commonId,
                                               @Query("address") String address,
                                               @Query("supervisorDoctor") String supervisorDoctor,
                                               @Query("protopathy") String protopathy);

    //注册
    @POST("patientInfo/LXT_User_Register")
    Observable<DataStateResult> RegisterInfo(@Query("phoneNumber") String phoneNumber, @Query("password") String password);

    //忘记密码
    @POST("patientInfo/LXT_User_ResetPassword")
    Observable<DataStateResult> ForgetPwd(@Query("phoneNumber") String phoneNumber, @Query("password") String password);

    //检测版本更新
    @POST("Appversioninfo/getnewapp")
    Observable<OuterLayerDataResult<UpdateEdition>> UpApp(@Query("usertype") String usertype);

    //修改密码
    @POST("patientInfo/LXT_User_ChangePassword")
    Observable<DataStateResult> UpPassword(@Query("userCode") String userCode, @Query("userId") String userId, @Query("oldPassword") String oldPassword, @Query("newPassword") String newPassword);

    //修改手机号码
    @POST("patientInfo/LXT_User_ChangePhone")
    Observable<DataStateResult> UpPhone(@Query("userCode") String userCode, @Query("userId") String userId, @Query("password") String password, @Query("phoneNumber") String phoneNumber);

    //意见反馈
    @POST("userFeedbackInfo/LXT_UpdateFeedBackInfo")
    Observable<DataStateResult> Feedback(@Query("userId") String userId,
                                         @Query("userCode") String userCode,
                                         @Query("message") String message,
                                         @Query("telphone") String telphone,
                                         @Query("version") String version,
                                         @Query("cover") String cover,
                                         @Query("userType") String userType);

    //图片提交
    @Multipart
    @POST("Images/upload_more")
    Observable<PhotoUrlData> PostPicture(@PartMap Map<String, RequestBody> params);

    //我的收藏
    @POST("userCollectionInfo/LXT_GetCollectionInfo")
    Observable<AnotherResult<CollectionListData>> MyCollection(@Query("userId") String userId, @Query("userCode") String userCode,@Query("page") String page,@Query("userType") String userType);

    //咨询详情
    String ConsultationDetails = RetrofitConnection.RoutineUrls + "MedicalInformations/showview?id=";

    //我的医生列表
    @POST("doctorPatientRelative/LXT_GetMyDoctorsIDOfPendingDiagnosis")
    Observable<AnotherResult<DoctorListBean>> MyDoctorListServer(@Query("userCode") String userCode,
                                                                 @Query("patientId") String patientId,
                                                                 @Query("patientType") String patientType,
                                                                 @Query("page") String page);

    //医生坐诊信息
    @POST("doctorVisitInfo/LXT_selectAmendVisitInfo")
    Observable<GetAmendVisitInfo> ProvideInformationServer(@Query("userCode") String userCode, @Query("userId") String userId);

    //医生列表
    @POST("doctorInfo/LXT_SearchDoctorsList")
    Observable<AnotherResult<DoctorListBean>> DoctorAllServer(@Query("userCode") String userCode,
                                                              @Query("userId") String patientId,
                                                              @Query("provenceId") String provenceId,
                                                              @Query("cityId") String cityId,
                                                              @Query("hospitalId") String hospitalId,
                                                              @Query("departmentId") String departmentId,
                                                              @Query("pageSize") String pageSize,
                                                              @Query("page") String page,
                                                              @Query("rName") String rName);

    //热门医生
    @POST("doctorInfo/LXT_StarDoctorList")
    Observable<AnotherResult<DoctorListBean>> StarDoctorList(@Query("userCode") String userCode,@Query("patientId") String patientId,@Query("page")String page);

    //好友列表
    @POST("friendInfo/LXT_SelectFriendList")
    Observable<AnotherResult<FriendsData>> FriendsListServer(@Query("userCode") String userCode, @Query("userId") String userId, @Query("userType") String userType,@Query("page") String page);

    //查找好友
    @POST("friendInfo/LXT_GetFriendList")
    Observable<SelectFriendsData> AddSelectFriendsServer(@Query("userCode") String userCode, @Query("userId") String userId, @Query("userType") String userType, @Query("phone") String phone);

    //添加好友
    @POST("friendInfo/LXT_AddFriend")
    Observable<DataStateResult> BTFriends(@Query("userCode") String userCode,
                                          @Query("userId") String userId,
                                          @Query("userType") String userType,
                                          @Query("friendId") String friendId,
                                          @Query("status") String status);

    //好友消息
    @POST("friendInfo/LXT_FriendNotification")
    Observable<AnotherResult<FriendsData>> FriendNotificationServer(@Query("userCode") String userCode,
                                                                    @Query("userFellowId") String userFellowId,
                                                                    @Query("userType") String userType);

    //同意拒绝好友
    @POST("friendInfo/LXT_AddFriendConsentRejection")
    Observable<DataStateResult> AddFriendConsentServer(@Query("userCode") String userCode,
                                                       @Query("userId") String userId,
                                                       @Query("userType") String userType,
                                                       @Query("friendId") String friendId,
                                                       @Query("status") String status);

    //咨询列表
    @POST("medicalInformations/LXT_GetMedicalInformationsList")
    Observable<AnotherResult<ConsultationBean>> RecommendListServer(@Query("userCode") String userCode, @Query("page") String page);

    //获取化验报告信息
    @POST("inspectionIndex/LXT_GetPatientSingleInspectionList")
    Observable<AnotherResult<TestPresentationData>> HistoryLaboratoryServer(@Query("userCode") String userCode,
                                                                            @Query("patientId") String patientId,
                                                                            @Query("startTime") String startTime,
                                                                            @Query("endTime") String endTime);

    //获取单日化验报告
    @POST("inspectionIndex/LXT_GetPatientInspectionRecords")
    Observable<AnotherResult<TestRecordData>> TestRecordDataServer(@Query("userCode") String userCode, @Query("patientId") String patientId, @Query("startTime") String startTime);

    //不适症状添加
    @Multipart
    @POST("troubleDetail/LXT_AddTroubleDetail")
    Observable<DataStateResult> AddTroubleDetailServer(@PartMap Map<String, RequestBody> params);
//    @Query("userCode") String userCode,
//    @Query("userId") String userId,
//    @Query("durationId") String durationId,
//    @Query("description") String description,
//    @Query("list") String list

    //获取患者档案袋信息
    @POST("inspectionPicDetail/LXT_GetPatientInspectionPortfolio")
    Observable<AnotherResult<ArchivesData>> ArchivesDataServer(@Query("userCode") String userCode,
                                                               @Query("patientId") String patientId,
                                                               @Query("itemId") String itemId,
                                                               @Query("page") String page);

    //获取诊断信息
    @POST("diagnoseList/LXT_GetPatientSingleDiagnoseDetail")
    Observable<AnotherResult<DiagnosisData>> DiagnosisDataServer(@Query("userCode") String userCode,
                                                                 @Query("patientId") String patientId,
                                                                 @Query("recordTime") String recordTime,
                                                                 @Query("endTime") String endTime);

    //获取单日不适症状信息
    @POST("troubleDetail/LXT_GetPatientSingleTroubleDetail")
    Observable<AnotherResult<DiscomfortData>> DiscomfortDataServer(@Query("userCode") String userCode,
                                                                   @Query("patientId") String patientId,
                                                                   @Query("endTime") String endTime,
                                                                   @Query("recordTime") String recordTime,
                                                                   @Query("description") String description);

    //获取患者一周检查记录
    @POST("dailyRecordDetail/LXT_User_GetUserDailyRecord_AWeek")
    Observable<AnotherResult<List<RecordingAnalysisData>>> RecordingAnalysisData(@Query("userCode") String userCode,
                                                                                 @Query("userId") String userId,
                                                                                 @Query("checkItemId") String checkItemId,
                                                                                 @Query("startTime") String startTime,
                                                                                 @Query("endTime") String endTime);


    //化验单提交
    @Multipart
    @POST("inspectionIndex/LXT_AddInspectionContentData")
    Observable<DataStateResult> AddInspectionContentServer(@PartMap Map<String, RequestBody> params);

    //申请取消医生
    @POST("doctorPatientRelative/LXT_UpdateDoctorPatientRelative")
    Observable<DataStateResult> UpdateDoctorPatientServer(@Query("userCode") String userCode, @Query("patientId") String patientId, @Query("doctorId") String doctorId);

    //下一天化验单
    @POST("inspectionIndex/LXT_NextDayInspectionContent")
    Observable<AnotherResult<TestRecordData>> NextDayInspectionServer(@Query("userCode") String userCode,
                                                                      @Query("patientId") String patientId,
                                                                      @Query("startTime") String startTime);

    //上一天化验单
    @POST("inspectionIndex/LXT_LastDayInspectionContent")
    Observable<AnotherResult<TestRecordData>> LastDayInspection(@Query("userCode") String userCode,
                                                                @Query("patientId") String patientId,
                                                                @Query("startTime") String startTime);

    //修改旋转后的图片
    @POST("inspectionPicDetail/LXT_UpdateInspectionPicDetail")
    Observable<DataStateResult> UpdateInspectionPicServer(@Query("id") String id, @Query("cover") String cover);

    //折线图
    @POST("inspectionIndex/LXT_SevenDayInspectionData")
    Observable<SevenDayInspectionData> SevenDayInspectionServer(@Query("userCode") String userCode,
                                                                @Query("patientId") String patientId,
                                                                @Query("endTime") String endTime,
                                                                @Query("itemName") String itemName,
                                                                @Query("type") String type);

    //移除化验单item
    @POST("inspectionContent/LXT_deleteInspectionContent")
    Observable<DataStateResult> GetRecentDiagnoseServer(@Query("userCode") String userCode, @Query("patientId") String patientId, @Query("id") String id);

    //日期上显示诊断信息
    @POST("diagnoseList/LXT_GetDiagnoseList")
    Observable<AnotherResult<DiagnoseListData>> DiagnoseListServer(@Query("userCode") String userCode,
                                                                   @Query("userId") String patientId,
                                                                   @Query("startTime") String startTime,
                                                                   @Query("endTime") String endTime);

    //查询上次下次不适症状信息
    @POST("troubleDetail/LXT_GetRecentTroubleDetail")
    Observable<AnotherResult<DiscomfortData>> GetRecentTroubleDetailServer(@Query("userCode") String userCode,
                                                                           @Query("patientId") String patientId,
                                                                           @Query("recordTime") String recordTime);

    //添加用药信息
    @Multipart
    @POST("prescriptionDetail/LXT_AddPrescription")
    Observable<DataStateResult> AddPrescriptionServer(@PartMap Map<String, RequestBody> params);


    //克隆药单
    @POST("prescriptionDetail/LXT_ClonePrescription")
    Observable<ClonePrescriptionData> ClonePrescriptionServer(@Query("userCode") String userCode,
                                                              @Query("patientId") String patientId,
                                                              @Query("doctorId") String doctorId,
                                                              @Query("startTime") String startTime,
                                                              @Query("mName") String mName,
                                                              @Query("doseName") String doseName);

    //删除药单
    @POST("prescriptionDetail/LXT_DeletePrescription")
    Observable<DataStateResult> DeletePrescriptionServer(@Query("userCode") String userCode,
                                                         @Query("patientId") String patientId,
                                                         @Query("doctorId") String doctorId,
                                                         @Query("id") String id,
                                                         @Query("editMessage") String editMessage,
                                                         @Query("editType") String editType,
                                                         @Query("patientName") String patientName,
                                                         @Query("doctorName") String doctorName,
                                                         @Query("hospitalName") String hospitalName,
                                                         @Query("prescription") String prescription);

    //修改药单
    @Multipart
    @POST("prescriptionDetail/LXT_AmendPrescription")
    Observable<DataStateResult> updatePrescription(@PartMap Map<String, RequestBody> params);

    //一键服药
    @POST("patientDoseDetail/LXT_AddMutiTakeMedicine")
    Observable<DataStateResult> AddMutiTakeMedicineServer(@Query("userCode") String userCode,
                                                          @Query("userId") String userId,
                                                          @Query("detailId") String detailId,
                                                          @Query("status") String status);

    //一种服药信息提交
    @POST("patientDoseDetail/LXT_AddOneTakeMedicine")
    Observable<DataStateResult> AddOneTakeMedicine(@Query("userCode") String userCode,
                                                   @Query("status") String status,
                                                   @Query("Id") String Id,
                                                   @Query("detailId") String detailId,
                                                   @Query("hasServedTime") String hasServedTime);

    //获取单日服药记录信息
    @POST("patientDoseDetail/LXT_GetPatientSingleDoseDetail")
    Observable<AnotherResult<OnedayMedicationData>> GetPatientSingleDoseDetailServer(@Query("userCode") String userCode,
                                                                                     @Query("patientId") String patientId,
                                                                                     @Query("recordTime") String recordTime);

    //获取当日服药单详情
    @POST("prescriptionDetail/LXT_GetPatientSinglePrescrptionDetail2")
    Observable<PrescriptionDayData> GetPatientSinglePrescrptionDetail2Server(@Query("userCode") String userCode, @Query("patientId") String patientId);

    //获取历史药单
    @POST("prescriptionDetail/LXT_GetPatientSinglePrescrptionDetail")
    Observable<PrescriptionDayData> GetPatientSinglePrescrptionDetail(@Query("userCode") String userCode,
                                                                      @Query("patientId") String patientId,
                                                                      @Query("recordTime") String recordTime,
                                                                      @Query("endTime") String endTime,
                                                                      @Query("page") String page);


    @POST("patientDoseIndex/LXT_GetPatientDoseRecords")
    Observable<AnotherResult<MedicationRecordData>> MedicationRecordDataServer(@Query("userCode") String userCode,
                                                                               @Query("patientId") String patientId,
                                                                               @Query("startTime") String startTime,
                                                                               @Query("endTime") String endTime);

    @POST("dailyRecordDetail/LXT_GetUserOneDayDailyRecord")
    Observable<AnotherResult<DailyRecordDetailsData>> GetUserOneDayDailyRecordServer(@Query("userCode") String userCode,
                                                                                     @Query("patientId") String patientId,
                                                                                     @Query("itemName") String itemId,
                                                                                     @Query("dayTime") String dayTime,
                                                                                     @Query("type") String type);

    //下载图片
    @Streaming
    @GET
    Observable<ResponseBody> downloadPicFromNet(@Url String fileUrl);

    //删除图片
    @POST("inspectionPicDetail/LXT_DeleteInspectionPicDetail")
    Observable<DataStateResult> DeleteInspectionPicServer(
            @Query("userCode") String userCode,
            @Query("patientId") String patientId,
            @Query("id") String id);

    //提交一种日常检查项信息
    @POST("dailyRecordDetail/LXT_AddDailyRecordDetail")
    Observable<DataStateResult> AddDailyRecordDetailServer(@Query("userCode") String userCode,
                                                           @Query("patientId") String patientId,
                                                           @Query("logValue") String logValue,
                                                           @Query("logTime") String logTime,
                                                           @Query("markValue") String markValue,
                                                           @Query("paired") String paired,
                                                           @Query("dailyitemName") String dailyitemName,
                                                           @Query("dailyitemDose") String dailyitemDose,
                                                           @Query("warn") String warn);

    //提交更多日常数据
    @Multipart
    @POST("dailyRecordDetail/LXT_AddDailyRecord")
    Observable<DataStateResult> moreAddDailyRecordServer(@PartMap Map<String, RequestBody> params);


    //新增日常检查项目
    @POST("dailyRecordIndex/LXT_AddDailyItem")
    Observable<DataStateResult> AddDailyItem(@Query("userCode") String userCode,
                                             @Query("userId") String userId,
                                             @Query("dailyitemName") String dailyitemName,
                                             @Query("dailyitemDose") String dailyitemDose,
                                             @Query("checkTime") String checkTime,
                                             @Query("itemId") String itemId);

    //删除日常检查项目
    @POST("dailyRecordIndex/LXT_DeleteDailyItem")
    Observable<DataStateResult> DeleteDailyItemServer(@Query("userCode") String userCode,
                                                @Query("id") String id);
    //获取单日日常记录信息
    @POST("dailyRecordDetail/LXT_DoctorGainPatientDailySingleRecord")
    Observable<AnotherResult<DailyRecordDetailsData>> GetPatientDailySingleRecords(@Query("userCode") String userCode,
                                                                                   @Query("patientId") String patientId,
                                                                                   @Query("startTime") String startTime);


    //查询日常记录日期信息
    @POST("dailyRecordIndex/LXT_GetPatientDailyRecords")
    Observable<AnotherResult<DailyRecordData>> GetPatientDailyRecordsServer(@Query("userCode") String userCode,
                                                                            @Query("patientId") String patientId,
                                                                            @Query("startTime") String startTime,
                                                                            @Query("endTime")String endTime);

    //历史日常记录折线图
    @POST("dailyRecordDetail/LXT_User_GetUserAloneItemDailyRecord_AWeek")
    Observable<AnotherResult<DailyRecordDetailsData>> GetUserAloneItemDailyRecordServer(@Query("userCode") String userCode,
                                                                                        @Query("userId") String userId,
                                                                                        @Query("itemName") String itemName,
                                                                                        @Query("startTime") String startTime,
                                                                                        @Query("endTime") String endTime);

    //查询历史日常一天的折线图
    @POST("dailyRecordDetail/LXT_User_GetUserDailyRecord_AWeek2")
    Observable<AnotherResult<DailyRecordDetailsData>> GetUserDailyRecord_AWeek2(@Query("userCode") String userCode,
                                                                                @Query("userId") String userId,
                                                                                @Query("itemName") String itemName,
                                                                                @Query("startTime") String startTime,
                                                                                @Query("endTime") String endTime);

    //根据医生的环信账号获取医生的个人信息
    @POST("doctorInfo/LXT_User_ChangeBomNameDoctorInfo")
    Observable<AnotherDataResult<DoctorListBean>> User_ChangeBomNameServer(@Query("userCode") String userCode,
                                                                           @Query("userId") String userId,
                                                                           @Query("bomName") String bomName);

    //注册后个人信息单项提交
    @POST("patientInfo/LXT_User_SubmitAloneUserInformation")
    Observable<DataStateResult> SubmitAloneUserInformationServer(@Query("userCode") String userCode,
                                                           @Query("userId") String userId,
                                                           @Query("rowName") String rowName,
                                                           @Query("content") String content,
                                                                 @Query("tableName") String tableName);


    //查询调药记录信息PrescriptionDayData//QueryAllPrescription
    @POST("prescriptionDetail/LXT_QueryAllPrescription")
    Observable<AnotherResult<DrugsAdjustmentData>> QueryAllPrescription(@Query("userCode") String userCode, @Query("patientId") String patientid, @Query("page") String page);


    //转存图片
    @POST("inspectionPicDetail/LXT_AddInspection")
    Observable<DataStateResult> LXT_AddInspection(
            @Query("userCode") String userCode
            , @Query("patientId") String patientId
            , @Query("doctorId") String doctorId
            , @Query("inspectionTypeTime") String inspectionTypeTime
            , @Query("Cover") String Cover);

    //同共体患者
    @POST("friendInfo/LXT_SelectTheTotalBody3")
    Observable<DataStateResult> SelectTheTotalBody3(@Query("userCode") String userCode,@Query("patientId") String patientId,
                                                    @Query("phone") String phone);

    //获取同共体患者
    @POST("friendInfo/LXT_SelectTheTotalBody2")
    Observable<DataHeadResult<PatientInfoData>> SelectTheTotalBody2Server(@Query("userCode") String userCode,
                                                                          @Query("patientId") String patientId);

    //帖子平评论
    @POST("userCommentInfo/LXT_UpdateCommentPost")
    Observable<DataStateResult> UpdateCommentPostServer(@Query("userCode") String userCode,
                                                        @Query("userId") String userId,
                                                        @Query("postId") String postId,
                                                        @Query("commentContent") String commentContent,
                                                        @Query("userType") String userType);

    //帖子点赞
    @POST("userPraiseInfo/LXT_UpdatePraisePost")
    Observable<DataStateResult> UpdatePraisePostServer(@Query("userCode") String userCode,@Query("userId") String userId,
                                                       @Query("postId") String postId,@Query("praiseType") String praiseType);

    //帖子列表
    @POST("userPostInfo/LXT_GetPostList")
    Observable<AnotherResult<CommunityData>> GetPostListServer(@Query("userCode") String userCode,
                                                               @Query("userId") String userId,
                                                               @Query("page") String page);

    //生命史
    @POST("patientCaseHistoryIndex/LXT_HealthRecords")
    Observable<HealthRecordsBean> LXT_HealthRecordsServer(@Query("userCode") String userCode,
                                                    @Query("userId") String userId,
                                                    @Query("startTime") String startTime,
                                                    @Query("endTime") String endTime,
                                                    @Query("page") String page,
                                                    @Query("type") String type);



    //获取一天的诊断信息
    @POST("diagnoseList/LXT_GetRecentDiagnoseList")
    Observable<AnotherResult<DiagnosisData>> LXT_GetRecentDiagnoseListServer(@Query("userCode") String userCode,
                                                                             @Query("patientId") String patientId,
                                                                             @Query("dayTime") String dayTime);
    //获取极光推送的消息
    @POST("userMessageIndex/LXT_GetUserLatestMessage")
    Observable<AnotherResult<PushinfoData>> GetUserLatestMessage(@Query("userCode") String  userCode,
                                                                 @Query("userId") String userId,
                                                                 @Query("userType") String userType,
                                                                 @Query("page") String page);
    //用户发帖
    @POST("userPostInfo/LXT_PublicPostInfo")
    Observable<DataStateResult> PublicPostInfoServer(@Query("userCode") String userCode,
                                               @Query("userId") String userId,
                                               @Query("content") String content,
                                               @Query("userType") String userType,
                                               @Query("cover") String cover);

    //首页咨询轮播
    @POST("medicalInformations/LXT_GetCarouselInformations")
    Observable<AnotherResult<CarouselData>> GetCarouselInformationsServer(@Query("userCode") String userCode,@Query("userId") String userId,
                                                                          @Query("page") String page,@Query("pageSize") String pageSize);

    //咨询是否收藏
    @POST("userCollectionInfo/LXT_GetCollectionInfoExist")
    Observable<DataStateResult> GetCollectionInfoExistServer(@Query("userCode") String userCode,@Query("userId") String userId,@Query("recordId") String recordId,@Query("userType") String userType);


    //收藏咨询
    @POST("userCollectionInfo/LXT_UpdateMedicalInformationCollect")
    Observable<DataStateResult> UpdateMedicalInformationCollect(@Query("userCode") String userCode,@Query("userId") String userId,@Query("recordId") String recordId,@Query("userType") String userType);

    //添加病例
    @POST("patientCaseHistoryIndex/LXT_AddPatientCaseHistory")
    Observable<DataStateResult> AddPatientCaseHistoryServer(@Query("userCode") String userCode,@Query("patientId") String patientId,@Query("hosId") String hosId,
                                                            @Query("title") String title,@Query("description") String description,
                                                            @Query("createTime") String createTime,@Query("cover") String cover);

    //获取病例数据
    @POST("patientCaseHistoryDetail/LXT_GetPatientCaseHistory")
    Observable<AnotherResult<CaseinformationData>> GetPatientCaseHistoryServer(@Query("userCode") String userCode,@Query("patientId") String patientId,
                                                                               @Query("startTime") String startTime,@Query("endTime") String endTime);

    //删除病例数据
    @POST("patientCaseHistoryIndex/LXT_delePatientCaseHistory")
    Observable<DataStateResult> DeletePatientCaseServer(@Query("userCode") String userCode,
                                                        @Query("patientId") String patientId,
                                                        @Query("id") String id);

    //修改病例信息
    @POST("patientCaseHistoryIndex/LXT_AmmnPatientCaseHistory")
    Observable<DataStateResult> UpdatePatientCaseServer(@Query("userCode") String userCode,
                                                        @Query("patientId") String patientId,
                                                        @Query("id") String id,
                                                        @Query("title") String title,
                                                        @Query("description") String description,
                                                        @Query("cover") String cover,
                                                        @Query("createTime") String createTime,
                                                        @Query("hosId") String hosId);

    //查看消息
    @POST("userMessageIndex/LXT_UpdateUserMessage")
    Observable<DataStateResult> UpdateUserMessageServer(@Query("userCode") String userCode,@Query("Id") String patientId);

    //根据医生的id查询医生的信息
    @POST("doctorInfo/LXT_GetByIdDoctorInfo")
    Observable<AnotherDataResult<DoctorListBean>> GetMyPatientInfoListServer(@Query("userCode") String userCode,@Query("doctorId") String doctorId);


    //修改/删除日常已提交的数据
    @POST("dailyRecordDetail/updateAloneItemDailyRecordDetail")
    Observable<DataStateResult> updateAloneItemDailyRecordDetailServer(@Query("userCode") String userCode,
                                                                       @Query("id") String id,
                                                                       @Query("logValue") String logValue,
                                                                       @Query("paired")String paired,
                                                                       @Query("markValue") String markValue,
                                                                       @Query("type")String type,
                                                                       @Query("warn") String warn,
                                                                       @Query("indexId") String indexId);

    //查询上次日常数据
    @POST("dailyRecordDetail/LXT_GetlastDailyRecordList")
    Observable<AnotherResult<DailyRecordDetailsData>> lastDailyRecordListServer(@Query("userCode") String userCode,
                                                                          @Query("patientId") String patientId,
                                                                          @Query("toDay") String toDay);
    //查询下次日常记录
    @POST("dailyRecordDetail/LXT_GetNextDailyRecordList")
    Observable<AnotherResult<DailyRecordDetailsData>> GetNextDailyRecordListServer(@Query("userCode") String userCode,
                                                                                   @Query("patientId") String patientId,
                                                                            @Query("toDay") String toDay);

    //上次服药信息
    @POST("dailyRecordDetail/LXT_GetlastPatientDoseIndex")
    Observable<AnotherResult<OnedayMedicationData>> GetlastPatientDoseIndexServer(@Query("userCode") String userCode,
                                                                                  @Query("patientId") String patientId,
                                                                                  @Query("toDay") String toDay);

    //下次服药信息
    @POST("dailyRecordDetail/LXT_GetNextPatientDoseIndex")
    Observable<AnotherResult<OnedayMedicationData>> GetNextPatientDoseIndexServer(@Query("userCode") String userCode,
                                                                                  @Query("patientId") String patientId,
                                                                                  @Query("toDay") String toDay);


    //查询复诊消息
    @POST("userMessageIndex/LXT_GetUserLatestMessageEx")
    Observable<AnotherResult<PushinfoData>> GetUserLatestMessageEx(@Query("userCode") String userCode,
                                                                   @Query("userId")  String userId,
                                                                   @Query("userType") String userType,
                                                                   @Query("messageType") String messageType,
                                                                   @Query("sendId") String sendId);

    //删除医生
    @POST("doctorPatientRelative/LXT_DeletePatient")
    Observable<DataStateResult> DeletePatient(@Query("userCode") String userCode,
                                              @Query("patientId") String patientId,
                                              @Query("doctorId") String doctorId);


    //查询化验记录图标
    @POST("inspectionIndex/LXT_GetPatientInspectionListAndDiagnoseList")
    Observable<ListDiagnose> LXT_GetPatientInspectionListAndDiagnoseList(
            @Query("userCode") String userCode,
            @Query("patientId") String patientId,
            @Query("startTime") String startTime,
            @Query("endTime") String endTime);

    //查询医生添加的事件
    @POST("inspectionEvent/LXT_GetPatientSingleInspectionEvent")
    Observable<AnotherResult<DoctorEventData>> GetPatientSingleInspectionEvent(  @Query("userCode") String userCode,
                                                                                 @Query("patientId") String patientId,
                                                                                 @Query("doctorId") String doctorId,
                                                                                 @Query("recordTime") String recordTime,
                                                                                 @Query("endTime") String endTime);


    //获取所有诊断信息
    @POST("diagnoseList/LXT_QueryGetPatientDiagnoseLsit")
    Observable<AnotherResult<DiagnosisData>> QueryGetPatientDiagnoseLsitServer(@Query("userCode") String userCode,
                                                                               @Query("userId") String userId,
                                                                               @Query("startTime") String startTime);

    //修改时间描述
    @POST("troubleDetail/LXT_AmmTroubleDetail")
    Observable<DataStateResult> AmmTroubleDetail(@Query("userCode") String userCode,
                                                 @Query("userId") String userId,
                                                 @Query("troubleName") String troubleName,
                                                 @Query("durationLength") String durationLength,
                                                 @Query("logTime") String logTime,
                                                 @Query("description") String description,
                                                 @Query("id") String id);


    //提交计步器数据
    @POST("externalRecords/LXT_AddExternalRecords")
    Observable<DataStateResult> AddExternalRecords(@Query("userCode") String userCode,
                                                   @Query("userId") String userId,
                                                   @Query("dataType") String dataType,
                                                   @Query("dataValue") String dataValue,
                                                   @Query("logTime") String logTime);

    //删除事件信息
    @POST("troubleDetail/LXT_DelTroubleDetail")
    Observable<DataStateResult> DelTroubleDetail(@Query("userCode") String userCode,
                                                 @Query("userId") String userId,
                                                 @Query("id") String id);

    //基础库更新
    @GET("baseInfoVersion/LXT_Get_Common_BaseInfo_Version")
    Observable<AnotherResult<BaseInfoVersionData>> CommonBaseInfoVersion();

    //获取更新的数据信息
    @POST("baseInfoVersion/LXT_GetQueryAllFromInformation")
    Observable<AnotherResult<Object>> GetQueryAllFromInformation(@Query("userCode") String userCode,
                                                                 @Query("userId") String userId,
                                                                 @Query("tableName") String tableName,
                                                                 @Query("version") String  version);

}

